package Base;

public class Sort {
    public static void main(String[] args) {

    }
}

class Solution{
    public static void selectSort(int[] array) {
        for ( int i=0;i<array.length-1;i++ ){
            //int min=array[i];
            int idx=i;
            for ( int j=i+1;j<array.length;j++ ){
                if ( array[j]<array[idx] ){
                    idx=j;
                }
            }
            int temp=array[i];
            array[i]=array[idx];
            array[idx]=temp;
        }
    }

    public static void shellSort(int[] array) {
        int gap = array.length;
        while (gap > 1) {
            shell(array,gap);
            gap /= 2;
        }
//整体进行插入排序
        shell(array,1);
    }

    public static void shell(int[] array,int gap) {

    }
}

